﻿<local:DocumentBase x:Class="WPFExcelReport.JLTAB05DOC"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"                
        xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls" 
          xmlns:DR="clr-namespace:WPFExcelReport;assembly=TDRAUFTR" 
                     xmlns:ABF="clr-namespace:WPFExcelReport;assembly=TABFOLGE" 
                    xmlns:AB="clr-namespace:WPFExcelReport;assembly=TABPOS" 
                    xmlns:WB="clr-namespace:WPFExcelReport;assembly=TWBBST" 
                     xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                     xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"
                    Name="TV"
          Loaded="Window_Loaded" 
     >
    <local:DocumentBase.Resources>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </local:DocumentBase.Resources>
    <Grid DataContext="{Binding}"  >
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="1*"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="1*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0">
            <WrapPanel>
                <Label Content="生产单号："    Width="77" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtKRS" Width="35" Margin="5,0,0,0"  HorizontalAlignment="Left" Background="Beige" Panel.ZIndex="1"
                         CharacterCasing="Upper" MaxLength="2" FontSize="18" Foreground="#FF141111" Height="33" />
                <TextBox Name="txtLFD" Width="107" Margin="5,0,0,0"  HorizontalAlignment="Left" Background="Pink" Panel.ZIndex="2"
                         KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="6" FontSize="18" Foreground="#FF141111" Height="33" />
                <TextBlock Margin="5,0,0,0" Height="33" Name="tbPOS" Text="" FontSize="18" Width="54" />
                <Button Content="查询" Height="33" Margin="10,0,0,0"  Name="btnQuery" Width="55" Panel.ZIndex="3"
                        Click="btnQuery_Click"/>
                <Button Content="整理工艺" Height="33" Margin="10,0,0,0"  Name="btnFPTECH" Width="65" Panel.ZIndex="20"
                        Click="btnFPTECH_Click"/>
                <Button Content="生产样工艺卡" Height="33" Margin="10,0,0,0"  Name="btnEXCEL" Width="87" Panel.ZIndex="12"
                        Click="btnEXCEL_Click"/>
                <Label Content="工序："    Width="44" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBlock Margin="5,0,0,0" Height="33" Name="tbFOLGE" Text="" FontSize="18" Width="44" />
                <Button Content="机台工艺卡" Height="33" Margin="10,0,0,0"  Name="btnMACHINE" Width="77" Panel.ZIndex="13"
                        Click="btnMACHINE_Click"/>
                <Button Content="磨毛工艺卡" Height="33" Margin="10,0,0,0"  Name="btnMM" Width="77" Panel.ZIndex="30"
                        Click="btnMM_Click"/>
                <Button Content="抓毛工艺卡" Height="33" Margin="10,0,0,0"  Name="btnZM" Width="77" Panel.ZIndex="31"
                        Click="btnZM_Click"/>
                
                 
            </WrapPanel>
        </StackPanel>
        <Grid Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="1*"></ColumnDefinition>
                <ColumnDefinition Width="1*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <DataGrid Grid.Column="0"
                        CanUserReorderColumns="True" CanUserResizeRows="True" CanUserSortColumns="True"
                         AutoGenerateColumns="False" EnableRowVirtualization="True"  
                        FontSize="11"
                        EnableColumnVirtualization="True"  
                        ScrollViewer.HorizontalScrollBarVisibility="Auto"
                        ScrollViewer.VerticalScrollBarVisibility="Auto" SelectionChanged="ABPOSDg_SelectionChanged"
                        RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                        IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                        ItemsSource="{Binding}" x:Name="ABPOSDg" >
                <!--ABPAUFKRS,ABPAUFLFD,ABPAUFPOS,ABPART,ABPFARBE,ABPBESCHICH,ABPSOLLMENGE1,
                        ABPSTARTDATA,ABPENDDATA,ABPANRKR,ABPALFDNR -->
                <DataGrid.Columns>
                    <DataGridTextColumn Binding="{Binding Path=ABPAUFKRS}" Header="前缀" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=ABPAUFLFD}" Header="单号" Width="SizeToCells" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=ABPAUFPOS}" Header="单行" Width="SizeToCells" MinWidth="40"/>
                    <DataGridTextColumn Binding="{Binding Path=ABPART}" Header="品种号" Width="SizeToCells" MinWidth="50" />
                    <DataGridTextColumn Binding="{Binding Path=ABPFARBE}" Header="颜色" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=ABPBESCHICH, Converter={StaticResource ResourceKey=gb2312}}" Header="后整理" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=QTY}" Header="数量" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=ABPSTARTDATA}" Header="开始日期" Width="SizeToCells" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=ABPENDDATA}" Header="结束日期" Width="SizeToCells" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=ABPANRKR}" Header=" " Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=ABPALFDNR}" Header="流程号" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=BEZ,Converter={StaticResource gb2312}}" Header="流程" Width="SizeToCells" MinWidth="30" />
                </DataGrid.Columns>
            </DataGrid  >
            <DataGrid Grid.Column="1"
                Margin="5,0,0,0"
                        CanUserReorderColumns="True" CanUserResizeRows="True" CanUserSortColumns="True"
                      AutoGenerateColumns="False" EnableRowVirtualization="True"  
                        FontSize="11"
                        EnableColumnVirtualization="True"  
                        ScrollViewer.HorizontalScrollBarVisibility="Auto"
                        ScrollViewer.VerticalScrollBarVisibility="Auto" SelectionChanged="ABFOLGEDg_SelectionChanged"
                        RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                        IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                        ItemsSource="{Binding}" x:Name="ABFOLGEDg" >
                <!--ABFAUFKRS,ABFAUFLFD,ABFAUFPOS,ABFAFOLGE,ABFAGANG,TRIM(ABFBZAGANG)AS STEP,ABFMTYP,ABFSOLLSTART,ABFSOLLDAT -->
                <DataGrid.Columns>
                    <DataGridTextColumn Binding="{Binding Path=ABFAFOLGE}" Header="工序号" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=ABFAGANG, Converter={StaticResource ResourceKey=gb2312}}" Header="编号" Width="SizeToCells" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=STEP,Converter={StaticResource gb2312}}" Header="工序名称" Width="SizeToCells" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=ABFMTYP}" Header="机器类型" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=ABFSOLLSTART}" Header="计划开始" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=ABFSOLLDAT}" Header="计划结束" Width="SizeToCells" MinWidth="30" />
                </DataGrid.Columns>
            </DataGrid  >
        </Grid>
        <WrapPanel Grid.Row="2"> 
                    <Label Content="品种名："    Width="67" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                    <TextBox Name="txtART" Width="157" Margin="5,0,0,0"  HorizontalAlignment="Left" Panel.ZIndex="4" Background="White"
                         CharacterCasing="Upper" MaxLength="20" FontSize="18" Foreground="#FF141111" Height="33" />
                    <TextBox Name="txtVAR" Width="38" Margin="5,0,0,0"  HorizontalAlignment="Left" Panel.ZIndex="5" Background="White"
                         CharacterCasing="Upper" MaxLength="3" FontSize="18" Foreground="#FF141111" Height="33" />
                    <TextBox Name="txtFARBE" Width="59" Margin="5,0,0,0"  HorizontalAlignment="Left" Panel.ZIndex="6" Background="White"
                         CharacterCasing="Upper" MaxLength="10" FontSize="18" Foreground="#FF141111" Height="33" />
                    <TextBox Name="txtBESCHICH" Width="68" Margin="5,0,0,0"  HorizontalAlignment="Left" Panel.ZIndex="7" Background="White"
                         CharacterCasing="Upper" MaxLength="10" FontSize="18" Foreground="#FF141111" Height="33" />
                    <Button Content="查询" Height="33" Margin="10,0,0,0"  Name="btnQueryTech" Width="55" Panel.ZIndex="8"
                        Click="btnQueryTech_Click"/>
                    <Button Content="拷贝参考工艺参数" Height="33" Margin="10,0,0,0"  Name="btnCOPY" Width="113" Panel.ZIndex="9"
                        Click="btnCOPY_Click"/>
                    <Button Content="保存手工修改工艺参数" Height="33" Margin="10,0,0,0"  Name="btnSAVE" Width="152" Panel.ZIndex="11"
                        Click="btnSAVE_Click"/>
                
            </WrapPanel>
        <TabControl Grid.Row="3">
            <TabItem Header="跟踪卡">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"></RowDefinition>
                        <RowDefinition Height="1*"></RowDefinition>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <WrapPanel Grid.Row="0" Grid.Column="0" >
                        <Grid Margin="10,0,0,0" VerticalAlignment="Top">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <DR:TDRAUFTR  Grid.Column="0" Name="cDR" DocType="JLTAB05CARD"
                                  Visibility="Collapsed" PrintType="OpenExcel" />
                            <Button  Grid.Column="1"   Click="AB05CardCommand" Height="20" Margin="5,0,0,0" Width="Auto" 
                             Content="{Binding Source={Localization:Translate Word=布卷清单}}" />

                        </Grid>
                    </WrapPanel>
                    <ABF:TAV13 Name="cABF" Grid.Row="1" Grid.Column="0" EXAUF="{Binding KEY,ElementName=TV}"/>
                    <WrapPanel  Grid.Row="0" Grid.Column="1"  >
                        <AB:TSAV04 Name="cTP" EXAUF="{Binding KEY,ElementName=TV}"/>
                        <AB:TNAV04  EXAUF="{Binding KEY,ElementName=TV}"
                                    Name="cNAV04" 
                                    />
                    </WrapPanel>

                    <WB:TAV04  Name="cWB" Grid.Row="1" Grid.Column="1"  
                           EXAUF="{Binding KEY,ElementName=cTP}"/>
                </Grid>
            </TabItem>
            <TabItem Header="工艺管理">
                <Grid Grid.Row="3">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>

                    <DataGrid Grid.Column="0"
                        CanUserReorderColumns="True" CanUserResizeRows="True" CanUserSortColumns="True"
                         AutoGenerateColumns="False" EnableRowVirtualization="True"  
                        FontSize="11"
                        EnableColumnVirtualization="True"  
                        ScrollViewer.HorizontalScrollBarVisibility="Auto"
                        ScrollViewer.VerticalScrollBarVisibility="Auto" SelectionChanged="ABPDg_SelectionChanged"
                        RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                        IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                        ItemsSource="{Binding}" x:Name="ABPDg" >
                        <!--ORDERNO ART QTY ABPSTARTDATA ABPENDDATA ABPANRKR ABPALFDNR -->
                        <DataGrid.Columns>
                            <DataGridTextColumn Binding="{Binding Path=ORDERNO}" Header="订单号" Width="SizeToCells" MinWidth="30" />
                            <DataGridTextColumn Binding="{Binding Path=ART}" Header="品种颜色" Width="SizeToCells" MinWidth="40" />
                            <DataGridTextColumn Binding="{Binding Path=QTY}" Header="数量" Width="SizeToCells" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=ABPSTARTDATA}" Header="计划开始" Width="SizeToCells" MinWidth="30" />
                            <DataGridTextColumn Binding="{Binding Path=ABPENDDATA}" Header="计划结束" Width="SizeToCells" MinWidth="30" />
                            <DataGridTextColumn Binding="{Binding Path=ABPANRKR}" Header="" Width="SizeToCells" MinWidth="30" />
                            <DataGridTextColumn Binding="{Binding Path=ABPALFDNR}" Header="流程号" Width="SizeToCells" MinWidth="30" />
                        </DataGrid.Columns>
                    </DataGrid  >
                    <DataGrid Grid.Column="1"
                    Margin="5,0,0,0"
                        CanUserReorderColumns="True" CanUserResizeRows="True" CanUserSortColumns="True"
                         AutoGenerateColumns="False" EnableRowVirtualization="True"  
                         FontSize="11"
                        EnableColumnVirtualization="True"  
                        ScrollViewer.HorizontalScrollBarVisibility="Auto"
                        ScrollViewer.VerticalScrollBarVisibility="Auto"
                        RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                        IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                        ItemsSource="{Binding}" x:Name="ABEDg" >
                        <!--ABEAUFKRS,ABEAUFLFD,ABEAUFPOS,ABEAFOLGE,TRIM(ABFBZAGANG)AS STEP,ABEMODNR,AMEBEZ,ABEWERTX,ABEWERTN,AMEMASS -->
                        <DataGrid.Columns>
                            <DataGridTextColumn Binding="{Binding Path=ABEAFOLGE}" Header="工序号" Width="SizeToCells" MinWidth="30" />
                            <DataGridTextColumn Binding="{Binding Path=STEP,Converter={StaticResource gb2312}}" Header="工序名" Width="SizeToCells" MinWidth="30" />
                            <DataGridTextColumn Binding="{Binding Path=ABEMODNR}" Header="参数号" Width="SizeToCells" MinWidth="30" />
                            <DataGridTextColumn Binding="{Binding Path=AMEBEZ,Converter={StaticResource gb2312}}" Header="参数项" Width="SizeToCells" MinWidth="30" />
                            <DataGridTextColumn Binding="{Binding Path=ABEWERTX}" Header="参数值" Width="SizeToCells" MinWidth="30" />
                            <DataGridTextColumn Binding="{Binding Path=AMEMASS}" Header="单位" Width="SizeToCells" MinWidth="30" />
                        </DataGrid.Columns>
                    </DataGrid  >
                    <DataGrid Grid.Column="2" Margin="5,0,0,0"
                        CanUserReorderColumns="True" CanUserResizeRows="True" CanUserSortColumns="True"
                         AutoGenerateColumns="False" EnableRowVirtualization="True"  
                        FontSize="11"
                        EnableColumnVirtualization="True"  
                        ScrollViewer.HorizontalScrollBarVisibility="Auto"
                        ScrollViewer.VerticalScrollBarVisibility="Auto"
                        RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                        IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                        ItemsSource="{Binding}" x:Name="ABARTEDg" >
                        <!--ABEAUFKRS,ABEAUFLFD,ABEAUFPOS,ABEAFOLGE,TRIM(ABFBZAGANG)AS STEP,ABEMODNR,AMEBEZ,ABEWERTX,ABEWERTN,AMEMASS -->
                        <DataGrid.Columns>
                            <DataGridTextColumn Binding="{Binding Path=ABEAFOLGE}" Header="工序号" Width="SizeToCells" MinWidth="30" />
                            <DataGridTextColumn Binding="{Binding Path=STEP,Converter={StaticResource gb2312}}" Header="工序名" Width="SizeToCells" MinWidth="30" />
                            <DataGridTextColumn Binding="{Binding Path=ABEMODNR}" Header="参数号" Width="SizeToCells" MinWidth="30" />
                            <DataGridTextColumn Binding="{Binding Path=AMEBEZ,Converter={StaticResource gb2312}}" Header="参数项" Width="SizeToCells" MinWidth="30" />
                            <DataGridTextColumn Binding="{Binding Path=ABEWERTX,Converter={StaticResource ResourceKey=gb2312}}" Header="参数值" Width="SizeToCells" MinWidth="30" />
                            <DataGridTextColumn Binding="{Binding Path=AMEMASS,Converter={StaticResource gb2312}}" Header="单位" Width="SizeToCells" MinWidth="30" />
                        </DataGrid.Columns>
                    </DataGrid  >

                </Grid>
            </TabItem>
           
        </TabControl> 
    </Grid>
</local:DocumentBase>
